package com.lancoo.znbkxx.net;

import java.util.HashMap;
import java.util.Map;

import io.reactivex.Observable;
import io.reactivex.observers.DisposableObserver;
import okhttp3.ResponseBody;

/**
 * Create by TangJun on 2019/2/19
 */
public class SelectInfoApi {
    public static void getSelectInfo(String schoolID, String packageID, String stuID,
                                     String globalGrade, String courseClassID, String searchField,
                                     String layer, String state, String dateField,
                                     String scoreField, String pageNumber, String pageSize,DisposableObserver<ResponseBody> subscriber) {
        //Bean bean = new Bean();
        //bean.getData().setMemberId(memberId);
        //SchoolID=S22-sa-2963&PackageID=&StuID=sastu255&
        // GlobalGrade=K9&CourseClassID=0A99D23C-A0F4-436F-9A8D-D6ECD382189E&SearchField=基础复习套卷一卷1&
        // Layer=0&State=-1&DateField=0&ScoreField=0&PageNumber=1&PageSize=10
        Map<String,String> map = new HashMap<>();
        map.put("SchoolID",schoolID);
        map.put("PackageID",packageID);
        map.put("StuID",stuID);
        map.put("GlobalGrade",globalGrade);
        map.put("CourseClassID",courseClassID);
        map.put("SearchField",searchField);
        map.put("Layer",layer);
        map.put("State",state);
        map.put("DateField",dateField);
        map.put("ScoreField",scoreField);
        map.put("PageNumber",pageNumber);
        map.put("PageSize",pageSize);
        Observable observable = HttpMethods.getInstance().getHttpApi().getSelectInfo(map); //在HttpServer中
        HttpMethods.getInstance().toSubscribe(observable, subscriber);
    }
}
